<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="../common.jsp"%>
<table class="resultsTable" style="width: 95%; table-layout: fixed;">
	<tr class="tableMainHeaderColor tableMainHeaderFont">
		<td >
			<span class="searchResultsCaption">&nbsp;&nbsp;SEARCH RESULTS</span>
		</td>
	</tr>
	<tr>
		<td><c:choose>
				<c:when test="${fn:length(documentList)>0}">
					<div>
						<table class="viewDetails">
							<tr class="heading">
								<th>Name</th>
								<th>Code</th>
								<th>Type</th>
								<th>Category</th>
								<th>Sub-Category</th>
								<th>Company</th>
								<th>Business Unit</th>		<!-- changed from location to business unit on 25-02-2012 as told by shubh -->
								<th>Department</th>
								<th>Issuing Authority</th>
								<th>Agreement Entered with</th>
								<th>Custodian Name</th>
								<th>Owner</th>
							</tr>
							<c:forEach var="tab" items="${documentList}" varStatus="loop">
								<c:set var="tabColor" value="odd"></c:set>
								<c:if test="${(loop.index % 2) eq 0}">
									<c:set var="tabColor" value="even"></c:set>
								</c:if>
								<tr class="${tabColor}">
									<td><a
										href="javascript:viewDocumentDetail('${tab.docId}','viewDocDetails')">${tab.docName}</a>
									</td>
									<td>${tab.docCode}</td>
									<td id="docTypeName">${tab.docType}</td>
									<td id="category">${tab.docCategory}</td>
									<td id="subCategory">${tab.docSubCategory}</td>
									<td id="docCompanyName">${tab.docCompanyName}</td>
									<td id="locName">${tab.docLoc}</td>
									<td id="deptName">${tab.docDeptt}</td>
									<td> ${tab.docIssuingAuthority } </td>
									<td> ${tab.docEnteredWith} </td>
									<td> ${tab.custodianName} </td>
									<td> ${tab.docOwnerName} (${tab.docOwnerId}) </td>
								</tr>
							</c:forEach>
						</table>
					</div>
				</c:when>
				<c:otherwise>
					<h3>No Document Exists as per the Selected Criteria</h3>
				</c:otherwise>
			</c:choose>
		</td>
	</tr>
</table>
